<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <title>转让流程</title>
    <link rel="stylesheet" href="assets/libs/layui/css/layui.css"/>
    <style>
        .body{
            padding: 0 5%;
        }
        .login-header {
            color: rgba(0, 0, 0, .85) !important;
            padding: 2% 0;
            text-align: center;
        }
        .layui-text em, .layui-word-aux {
            color: #ef0909 !important;
            padding: 0 5px !important;
        }
        .layui-input-block {
             margin-left: 0;
            min-height: 46px;
        }
		.content_box{
			max-width: 760px;
		}
        p{
            font-size: 16px;
        }
        .imgbox{
            width: 100%;
            display: flex;
            justify-content: center;
            margin-top: 10px;
        }
        .imgbox img{
            width: 52%;
            height: 20%;
        }
        .gonextpage{
            width: 60%;
            height: 45px;
            margin: 20px;
        }
    </style>
</head>
<body>
<div class="body">
    <div class="login-header">
        <h2 style="font-weight: 400;letter-spacing: 3px; font-size: 25px">转让流程介绍</h2>
    </div>
    <div class="layui-fluid content_box">
        <p>1、申请人：填写申请表</p>
        <p>2、申请人：下载生成后的申请表，线下审批盖章</p>
        <p>3、申请人：上传盖章后的文件到小程序</p>
        <p>4、二级单位进行审批</p>
        <p>5、科转中心：选择审批人（200万以下中办公室，200-500领导小组，500万以上校长办公室）</p>
        <p>6、进行审批</p>
        <p>7、科转中心：填写公示信息， 下载生成的《公示文件》， 进行公示</p>
        <p>8、科转中心：组织进行评估</p>
        <p>9、申请人：填写合同信息， 下载生成的《合同文件》，线下签订</p>
        <p>10、科转中心：知识产权登记，市场备案</p>
        <p>11、申请人：上传一个扫描件，内容包含：（1）专利合同 （2）、到帐单（3）、权力转让协议书</p>
        <p>12、申请人：下载《专利转让分配通知单》</p>
        <div class="imgbox">
            <img class="imgs" src="https://yalypic.oss-cn-beijing.aliyuncs.com/sxdx/projectfile/20240529160123.png" alt="">
        </div>
        <div style="width: 100%;"></div>
        <div style="display: flex;align-items: center;justify-content: center;"><button class="layui-btn site-demo-active gonextpage" lay-submit  onclick="gonextpage()">去填写申请表</button></div>       
    </div>
</div>
<script type="text/javascript" src="assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="assets/js/config.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>

<script src="https://wwcdn.weixin.qq.com/node/open/js/wecom-jssdk-1.3.1.js"></script>
<script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js" referrerpolicy="origin"></script>


<script>

    layui.config({
        base: 'assets/module/'
    }).use(['layer', 'form','upload'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var upload = layui.upload;
        var router = layui.router();
        /*var id = router.search.id; //获取id
        var opt_type = router.search.opt_type; //操作类型id
        var userid = router.search.userid; //用户id
        var opt_deptment = router.search.opt_deptment; //部门id*/

        //TODO  ajax请求页面 活体ticket https://desheng.hot68.cn/sxdx/api/public/index.php/app/Wxprogramehtml/getJsTicket
        let ticket = 'HoagFKDcsGMVCIY2vOjf9rP8NjF08k2irDD-aLYMA0EgI01L2jd0EIAg56_TPX5PW2B2VLxPLlxi1DiIvujDiQ'; //有效时长两个小时， 所以直接存后台取


        // 点击查看图片
        $(document).off('click','.imgs').on("click", ".imgs", function(event){
            var url = $(this).attr("src");
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                shadeClose: true,
                // area: ['1000px', '1000px'],
                content: "<img src=" + url + " width= \"100%\" height=\"auto\" />"
            });
            return false;
        });
        ww.register({
            corpId: 'wwa47bc7e61fce8af7',
            jsApiList: ["selectEnterpriseContact", "selectExternalContact", "openUserProfile","selectPrivilegedContact"],
            getConfigSignature() {
                return ww.getSignature('HoagFKDcsGMVCIY2vOjf9rP8NjF08k2irDD-aLYMA0EgI01L2jd0EIAg56_TPX5PW2B2VLxPLlxi1DiIvujDiQ')
            },
            success: function(res) {
                ww.initOpenData({success:function (res) {
                        console.log(WWOpenData,"初始化完成了哈哈哈哈")

                        WWOpenData.bind(document.querySelector('ww-open-data'));

                        console.log(WWOpenData,"初始化完成了哈哈哈哈")
                    },
                    error: function(res){
                        //请求异常回调
                        console.log("======================2")
                        console.log(res)
                        return false;
                    }});
            },
          error: function(res){
            //请求异常回调
            console.log(res)
            return false;
        }

        })

        // wx.agentConfig({
        //     corpid: '', // 必填，企业微信的corpid，必须与当前登录的企业一致
        //     agentid: '', // 必填，企业微信的应用id （e.g. 1000247）
        //     timestamp: , // 必填，生成签名的时间戳
        //     nonceStr: '', // 必填，生成签名的随机串
        //     signature: '',// 必填，签名，见附录-JS-SDK使用权限签名算法
        //     jsApiList: ['selectExternalContact'], //必填，传入需要使用的接口名称
        //     success: function(res) {
        //         // 回调
        //     },
        //     fail: function(res) {
        //         if(res.errMsg.indexOf('function not exist') > -1){
        //             alert('版本过低请升级')
        //         }
        //     }
        // });


        //

        $('#testChoicePer').on('click', function(){
            ww.selectEnterpriseContact({
                fromDepartmentId: -1,
                mode: 'multi',
                type: ['department', 'user'],
                selectedDepartmentIds: ['2', '3'],
                selectedUserIds: ['lisi', 'lisi2']
            })

        });



        function viewPort() {
            const meta = document.querySelector('meta[name="viewport"]');
            const scale = window.screen.width / 375 < 1 ? 1 : window.screen.width / 375;
            meta.content = `width=device-width,initial-scale=${scale}`
        }
        viewPort()
        window.onresize = viewPort;

        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)")
            var r = window.location.search.substr(1).match(reg)
            if (r != null) return unescape(r[2])
            return null
        }
        var id = getUrlParam('id');
        var opt_type = getUrlParam('opt_type');
        var userid = getUrlParam('userid');
        var opt_deptment = getUrlParam('opt_deptment');
        // show_title:options.type==1?'审批表盖章后附件PDF':'盖章后的附件PDF',
        // file_url_name:options.type==1?'req_file_pdf':'all_file_pdf',
        var show_title = opt_type==1?'审批表盖章后附件PDF':'盖章后的附件PDF';
        var show_common = opt_type==1?'':'专利合同、到帐单、权力转让协议书扫描到一个文件，';
        $('#show_title').html(show_title)
        $('#show_common').html(show_common)

        var uploadInst = upload.render({
            elem: '#upload_file' //绑定元素
            ,url: 'https://desheng.hot68.cn/sxdx/api/public/index.php/app/File/uploadFile.html' //上传接口
            ,accept:'file'
            ,data:{
                'dicName':'sxdxprojectfile',
                // 'type':'pdf'
            }
            ,done: function(res){
                //上传完毕回调
                if(res.success === true){
                    layer.msg('上传成功', {icon: 1,time:300}, function () {
                        $('#file_url').val(res.obj.file);
                        $('#file_name').show();
                        $('#file_name').html(res.obj.file_name)
                        form.render(null,'modifyForm');
                    });

                    console.log(1111111111111111)
                    return false;
                    /*wx.miniProgram.postMessage({
                        data: {
                            id:id,
                            type:opt_type,
                            fileName: res.data.obj.file_name,
                            fileUrl: res.data.obj.file
                        }
                    })
                    setTimeout(() => {
                        wx.miniProgram.navigateBack();
                    }, 100)*/
                }else {
                    console.log(22222222222222222222222)
                    layer.msg(res.msg, {icon: 2});
                    return false;
                }
            }
            ,error: function(res){
                //请求异常回调
                console.log(3333333333333333333333333333)
                layer.msg(res, {icon: 2});
                return false;
            }
        });


        //监听提交
        form.on('submit(modifyFormSubmit)', function(data){
            var DISABLED = 'layui-btn-disabled';
            // 增加样式
            $('.site-demo-active').addClass(DISABLED);
            // 增加属性
            $('.site-demo-active').attr('disabled', 'disabled');
            var form_data = data.field;
            if(!form_data.file_url){
                layer.msg('文件必传', {icon: 2});
                return false;
            }
            form_data.opt_json_content = JSON.stringify(data.field);
            form_data.knowledge_id = id
            form_data.opt_type = opt_type
            form_data.opt_userid = userid;
            form_data.opt_deptment = opt_deptment;
            $.post('https://desheng.hot68.cn/sxdx/api/public/index.php/app/Knowledge/modifyInfo.html',form_data, function (res) {
                if (res.success === true) {
                    layer.msg('提交成功', {icon: 1, time:300}, function () {
                        wx.miniProgram.navigateBack();
                    });
                }else {
                    layer.msg(res.msg, {icon: 2});
                    $('.site-demo-active').removeClass(DISABLED);
                    $('.site-demo-active').removeAttr('disabled');
                }
            }, 'json');
            return false;
        });




});
function gonextpage(params) {
    window.location.href = `addapply.html`;
}
</script>
</body>
</html>